package com.itheima.Work02;

import java.util.concurrent.atomic.AtomicInteger;

public class Box extends Thread{
    AtomicInteger atom =new AtomicInteger();

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            atom.getAndIncrement();
            System.out.println(Thread.currentThread().getName()+"送冰淇淋"+atom+"个");
        }
    }


}
